package com.biscuit.page.basicservice.api;

import com.biscuit.common.base.BaseResponse;
import com.biscuit.common.base.BaseResponseVoid;
import com.biscuit.common.annotation.RequestWhitelist;
import com.biscuit.page.basicservice.api.model.request.search.SearchSuggestAReq;
import com.biscuit.page.basicservice.api.model.response.search.SearchSuggestAResp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * @author mazihao
 * @createTime 2024/3/29 10:40
 */
@Api(tags = "搜索相关接口")
@RequestMapping("/search")
public interface ISearchRemote {

    @RequestWhitelist
    @ApiOperation(value = "获取联想词列表")
    @PostMapping("/suggest")
    BaseResponse<SearchSuggestAResp> suggest(@RequestBody SearchSuggestAReq req);

    @RequestWhitelist
    @ApiOperation(value = "更新搜索日志")
    @PutMapping("/updateLog/{logId}/{keyword}")
    BaseResponse<BaseResponseVoid> updateLog(@PathVariable("logId") Long id, @PathVariable("keyword") String keyword);

}
